<template>
    <div>
        <div class="mui-card" style="margin-bottom: 35px;">
            <ul class="mui-table-view">
                <li class="mui-table-view-cell mui-media" v-for="(item,index) in newsList" :key="index">
                    <router-link :to="'/home/newsinfor/'+item.id">
                        <img class="mui-media-object mui-pull-right" :src="item.img_url">
                        <div class="mui-media-body">
                            {{item.title}}
                            <p class='mui-ellipsis'>{{item.zhaiyao}}</p>
                        </div>
                    </router-link>
                </li>
            </ul>
        </div>
    </div>
</template>

<script>
    export default {
        data: function () {
            return {
                newsList: []
            }
        },
        methods: {
            getNewsList() {
                this.$http.get('http://www.liulongbin.top:3005/api/getnewslist').then(data => {
                    this.newsList = data.body.message;
                })
            }
        },
        created() {
            this.getNewsList();
        }
    }

</script>

<style>

</style>
